/* eslint-disable space-before-function-paren */
import { setToken, setFreshToken, getToken, getFreshToken } from '@/utils/auth'
export default {
  namespaced: true,
  state: {
    token: getToken(),
    refreshToken: getFreshToken(),
    operateRow: {}
  },
  mutations: {
    // eslint-disable-next-line space-before-function-paren
    getUserTokenMutation (store, paylod) {
      store.token = paylod.token
      store.refreshToken = paylod.refreshToken
      setToken(paylod.token)
      setFreshToken(paylod.refreshToken)
    },
    getOperateRow (store, paylod) {
      store.operateRow = JSON.parse(JSON.stringify(paylod))
    }
  },
  actions: {

  }
}
